package org.xp.judgeplatform.pojo.dto.LoginDevices;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

/**
 * 登录设备记录DTO
 */
@Data
@Schema(description = "登录设备记录DTO")
public class LoginDevicesRecordDTO {

    @NotNull(message = "用户ID不能为空")
    @Schema(description = "用户ID", example = "1")
    private Integer userId;

    @NotBlank(message = "设备ID不能为空")
    @Schema(description = "设备唯一标识（浏览器指纹）", example = "abc123def456")
    private String deviceId;

    @NotBlank(message = "设备名称不能为空")
    @Schema(description = "设备名称", example = "Windows Edge (本机)")
    private String deviceName;

    @Schema(description = "设备类型", example = "PC")
    private String deviceType;

    @Schema(description = "浏览器信息", example = "Edge 120.0.0.0")
    private String browser;

    @Schema(description = "操作系统", example = "Windows 11")
    private String os;

    @NotBlank(message = "登录方式不能为空")
    @Schema(description = "登录方式", example = "PASSWORD")
    private String loginMethod;

    @NotBlank(message = "IP地址不能为空")
    @Schema(description = "IP地址", example = "192.168.1.1")
    private String ipAddress;

    @Schema(description = "登录地点", example = "福建省 泉州市")
    private String location;

    @Schema(description = "会话令牌", example = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...")
    private String sessionToken;
}
